//---------------------------------------------------------------------------
#ifndef DropListBoxH
#define DropListBoxH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <StdCtrls.hpp>
//---------------------------------------------------------------------------
typedef void __fastcall (__closure *TListBoxDropFiles)(TObject *Sender, TStringList *DropFileNames);
class PACKAGE TDropListBox : public TListBox
{
private:
    void __fastcall WMDropFiles(TWMDropFiles Msg);
    TListBoxDropFiles FOnDropFiles;
    bool mfAccept;
    bool __fastcall GetDropAccept(void);
    void __fastcall SetDropAccept(bool fAccept);
protected:
public:
        __fastcall TDropListBox(TComponent* Owner);
__published:
    // プロパティの宣言
    __property bool DropAccept = {read=GetDropAccept,
                                      write=SetDropAccept,
                                      default=false};
    // イベントハンドラの宣言
    __property 	TListBoxDropFiles OnDropFiles={read=FOnDropFiles, write=FOnDropFiles};

BEGIN_MESSAGE_MAP
    MESSAGE_HANDLER(WM_DROPFILES, TWMDropFiles, WMDropFiles)
END_MESSAGE_MAP(TListBox)

};
//---------------------------------------------------------------------------
#endif
